#include<stdio.h>
#include<math.h>
void getx(void);
int getNumPeople(double p);
int main(){
	getx();
	int n;
	double p;
	printf("Enter the probability\n");
	scanf("%lf",&p);
	n = getNumPeople(p);
	printf("the number of people in the group is %d",n);
		
}
void getx(void){
	printf("Given the probability that two people in a group have the same birthday, this program computes the number of people in the group\n");
	printf("Enter non-negative value less than 1.0 for the probability\n");
}
int getNumPeople(double p){
	int n = (1+sqrt(1+4*2*log10(1 - p)/ log10(364.0/365.0)))/2;
	return n;
}
